import {doPost} from '../../utils/request'

// 平台端登录
function platformLogin ({params, callback}) {
  doPost({
    url: '/platform/Login/login',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 获取验证码
function getPlatformCode ({params, callback}) {
  doPost({
    url: '/platform/Send/sendmsg',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 获取学生列表
function platformStudentList ({params, callback}) {
  doPost({
    url: '/platform/Curriculum/student_cur',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 学生详情
function platformStudentDetail ({params, callback}) {
  doPost({
    url: '/platform/Curriculum/student_details',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 学生上课详情
function platformStudentCourse ({params, callback}) {
  doPost({
    url: '/platform/Curriculum/student_record',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 获取教师列表
function platformTeacherList ({params, callback}) {
  doPost({
    url: '/platform/Curriculum/index_cur',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 教师详情
function platformTeacherDetail ({params, callback}) {
  doPost({
    url: '/platform/Curriculum/index_teacher',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 课程详情
function platformCourseDetail ({params, callback}) {
  doPost({
    url: '/platform/Curriculum/curriculum_details',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 缴费记录
function platformCoursePay ({params, callback}) {
  doPost({
    url: '/platform/Curriculum/student_pay',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 获取机构列表
function platformAgencyList ({params, callback}) {
  doPost({
    url: '/platform/Curriculum/mechanism_list',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 机构详情
function platformAgencyDetail ({params, callback}) {
  doPost({
    url: '/platform/Curriculum/mechanism_details',
    params,
    success: res => {
      callback(res)
    }
  })
}

// 消息管理
function platformMessage ({params, callback}) {
  doPost({
    url: '/platform/Curriculum/message_management',
    params,
    success: res => {
      callback(res)
    }
  })
}

export default {
  platformLogin,
  platformStudentList,
  platformStudentDetail,
  platformStudentCourse,
  platformTeacherList,
  platformTeacherDetail,
  platformCourseDetail,
  platformAgencyList,
  platformAgencyDetail,
  getPlatformCode,
  platformCoursePay,
  platformMessage
}
